/* =========================
   RESET
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f6f6f6;
  color: #333;
}


/* =========================
   HEADER
========================= */
.header-top {
  background: #8B0000;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 80px;
  position: relative;
  flex-wrap: wrap;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 30px;
}

.logo {
  height: 100px;
  width: auto;
  transform: translateY(10px);
}

.header-title {
  font-family: 'Inria Serif', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.2;
}

.header-right {
  position: absolute;
  top: 15px;
  right: 40px;
  font-size: 14px;
  text-align: right;
}


/* =========================
   NAVIGATION
========================= */
nav {
  background: linear-gradient(90deg, #5c0000, #8B0000, #5c0000);
  padding: 22px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  list-style: none;
  gap: 90px;
  flex-wrap: wrap;
}
nav ul li a {
    text-decoration: none; 
    color: white;          
}
nav ul li {
  color: white;
  cursor: pointer;
  position: relative;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 1px;
  transition: 0.3s ease;
  
}

nav ul li:hover {
  color: #ffe5e5;
}

nav ul li::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 0%;
  height: 2px;
  background: #ffffff;
  transition: 0.3s;
}

nav ul li:hover::after {
  width: 100%;
}

.dropdown-content {
    background-color: #ffffff;    
    min-width: 250px;            
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2); 
    border-radius: 8px;        
}


.dropdown-content a {
    color: #333333 !important;   
    padding: 12px 16px;
    text-decoration: none;        
    display: block;
    text-align: left;            
    font-size: 14px;             
    transition: 0.3s;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;    
    color: #990000 !important;   
}

.dropdown-content {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 0;
  min-width: 260px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.dropdown-content div {
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;          
  color: #111111;           
  letter-spacing: 0.3px;     
  transition: all 0.25s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.dropdown-content div:hover {
  background: #f3f3f3;
  border-left: 4px solid #8B0000;
  color: #000000;            
  padding-left: 28px;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* =========================
   DROPDOWN - TEXT DARKER
========================= */

.dropdown-content {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 12px 0;
  min-width: 260px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.dropdown-content div {
  padding: 14px 22px;
  font-size: 16px;
  font-weight: 600;         
  color: #111111;            
  letter-spacing: 0.3px;    
  transition: all 0.25s ease;
  cursor: pointer;
  border-left: 4px solid transparent;
}

.dropdown-content div:hover {
  background: #f3f3f3;
  border-left: 4px solid #8B0000;
  color: #000000;            
  padding-left: 28px;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}



/* =========================
   Show section
========================= */
.show-section {

    background-image: url('image/back3.png'); 
    background-size: cover;
    background-position: center;
    height: 300px;
    display: flex;
    justify-content: center; 
}

.show-container h1 {
    font-size: 3.5rem;
    color: #5c0000;
    text-shadow: 2px 2px 10px rgba(169, 131, 131, 0.8); 
    margin-top: 80px;
    text-align: center;
}
.show-container h2 {
    font-size: 2.5rem;
    color: #000000;
    margin-top: 90px;
    margin-bottom: 50px;
    text-align: center;
    font-weight: 500;
}

/* =========================
  Professor section
========================= */

.faculty-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;                             
    padding: 20px;
    max-width: 1000px;                     
    margin: 0 auto;                       
}

.faculty-card {
    background: white;
    border: 1px solid #ddd;
    border-bottom: 4px solid #790d10;    
    border-radius: 5px;
    cursor: pointer;
    overflow: hidden;                    
    text-align: center;
    transition: 0.3s;
}

.faculty-card:hover {
    transform: translateY(-5px);           
}

.faculty-image img {
    width: 100%;                           
    height: 250px;                         
    object-fit: cover;                     
}

.faculty-info {
    padding: 10px;
    font-size: 14px;
}



/* =========================
   RESPONSIVE - TABLET
========================= */
@media (max-width: 1024px) {

  .header-top {
    padding: 30px 40px;
  }

  nav ul {
    gap: 40px;
  }

  .hero {
    height: 280px;
  }

  .hero h2 {
    font-size: 36px;
  }

  .container {
    width: 90%;
  }
}



/* =========================
   RESPONSIVE - MOBILE
========================= */
@media (max-width: 768px) {

  .header-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 25px 20px;
    gap: 15px;
  }

  .header-left {
    flex-direction: column;
    gap: 15px;
  }

  .logo {
    height: 80px;
    transform: none;
  }

  .header-title h1 {
    font-size: 18px;
  }

  .header-right {
    position: static;
    margin-top: 10px;
    text-align: center;
  }

  nav {
    padding: 15px 0;
  }

  nav ul {
    flex-direction: column;
    gap: 18px;
  }

  nav ul li {
    font-size: 16px;
  }

  .hero {
    height: 220px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .container {
    width: 92%;
    margin: 40px auto;
  }

  .content-box {
    padding: 25px;
  }

  .footer-logo {
    width: 150px;
  }
  .faculty-grid {
        grid-template-columns: repeat(2, 1fr); /* บนแท็บเล็ตแสดง 2 คอลัมน์ */
    }
/* =========================
   RESPONSIVE - SMALL MOBILE
========================= */
@media (max-width: 480px) {

  .hero h2 {
    font-size: 22px;
  }

  .section-title {
    font-size: 18px;
    padding: 10px 18px;
  }

  .content-box {
    font-size: 14px;
    line-height: 1.6;
  }
.faculty-grid {
        grid-template-columns: repeat(2, 1fr); /* บนแท็บเล็ตแสดง 2 คอลัมน์ */
    }
}
}


